home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus Leser 19
/
Amiga Plus Leser CD 19.iso
/
Online
/
AmigaTalk
/
intuition
/
BOOPSIMethodIDs.st
< prev
next >
Wrap
Text File
|
2002-03-15
|
2KB
|
53 lines
" -------------------------------------------------------------------- "
" MethodIDs Class is a Singleton class that allows the user to "
" reference BOOPSI Method IDs without having to remember their actual "
" hexadecimal values. "
""
" The User does NOT need to create one of these, since Intuition Class "
" will instantiate the only needed instance of this Class. See the "
" SetupIntuition.st source file for the method(s) that help the User "
" with this Class. "
""
" EXAMPLE: 'myTag <- intuition getMethodID: #OM_DISPOSE' "
""
" ALL singleton classes MUST contain the following: "
""
" the methods: isSingleton AND privateSetup AND "
" uniqueInstance Class instance variable. "
" -------------------------------------------------------------------- "
Class MethodIDs :Dictionary ! uniqueInstance !
[
isSingleton
^ true
|
privateNew ! newinstance !
newinstance <- super new.
^ newinstance
|
new
^ self privateSetup
|
privateSetup
(uniqueInstance isNil)
ifTrue: [uniqueInstance <- self privateNew.
self at: #OM_Dummy put: 16r100.
self at: #OM_NEW put: 16r101.
self at: #OM_DISPOSE put: 16r102.
self at: #OM_SET put: 16r103.
self at: #OM_GET put: 16r104.
self at: #OM_ADDTAIL put: 16r105.
self at: #OM_REMOVE put: 16r106.
self at: #OM_NOTIFY put: 16r107.
self at: #OM_UPDATE put: 16r108.
self at: #OM_ADDMEMBER put: 16r109.
self at: #OM_REMMEMBER put: 16r10A.
].
^ self "or ^ uniqueInstance??"
]